package com.ruoyi.bysj.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bysj.mapper.SysGoodsMapper;
import com.ruoyi.bysj.domain.SysGoods;
import com.ruoyi.bysj.service.ISysGoodsService;

/**
 * 仓库存储Service业务层处理
 * 
 * @author laow
 * @date 2021-10-18
 */
@Service
public class SysGoodsServiceImpl implements ISysGoodsService 
{
    @Autowired
    private SysGoodsMapper sysGoodsMapper;

    /**
     * 查询仓库存储
     * 
     * @param goodsId 仓库存储主键
     * @return 仓库存储
     */
    @Override
    public SysGoods selectSysGoodsByGoodsId(Long goodsId)
    {
        return sysGoodsMapper.selectSysGoodsByGoodsId(goodsId);
    }

    /**
     * 查询仓库存储列表
     * 
     * @param sysGoods 仓库存储
     * @return 仓库存储
     */
    @Override
    public List<SysGoods> selectSysGoodsList(SysGoods sysGoods)
    {
        return sysGoodsMapper.selectSysGoodsList(sysGoods);
    }

    @Override
    public List<SysGoods> selectGoodsAll() {
        return sysGoodsMapper.selectGoodsAll();
    }

    /**
     * 新增仓库存储
     * 
     * @param sysGoods 仓库存储
     * @return 结果
     */
    @Override
    public int insertSysGoods(SysGoods sysGoods)
    {
        return sysGoodsMapper.insertSysGoods(sysGoods);
    }

    /**
     * 修改仓库存储
     * 
     * @param sysGoods 仓库存储
     * @return 结果
     */
    @Override
    public int updateSysGoods(SysGoods sysGoods)
    {
        return sysGoodsMapper.updateSysGoods(sysGoods);
    }

    /**
     * 批量删除仓库存储
     * 
     * @param goodsIds 需要删除的仓库存储主键
     * @return 结果
     */
    @Override
    public int deleteSysGoodsByGoodsIds(Long[] goodsIds)
    {
        return sysGoodsMapper.deleteSysGoodsByGoodsIds(goodsIds);
    }

    /**
     * 删除仓库存储信息
     * 
     * @param goodsId 仓库存储主键
     * @return 结果
     */
    @Override
    public int deleteSysGoodsByGoodsId(Long goodsId)
    {
        return sysGoodsMapper.deleteSysGoodsByGoodsId(goodsId);
    }
}
